<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('用户信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <p>注册时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginRegistertime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endRegistertime]"/>
                            </li>
                            <li>
                                <p>openid：</p>
                                <input type="text" name="openid"/>
                            </li>
                            <li>
                                <p>昵称：</p>
                                <input type="text" name="nickname"/>
                            </li>
                            <li>
                                <p>手机号：</p>
                                <input type="text" name="phone"/>
                            </li>
                            <li>
                                <p>账户类型1qq，2微信：</p>
                                <select name="type" th:with="type=${@dict.getType('')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <p>0未知， 性别1男，2女：</p>
                                <input type="text" name="gender"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="age"/>
                            </li>
                            <li>
                                <p>学级【小初高大】：</p>
                                <input type="text" name="major"/>
                            </li>
                            <li>
                                <p>班【一年级二年级】：</p>
                                <input type="text" name="minor"/>
                            </li>
                            <li>
                                <p>省份：</p>
                                <input type="text" name="province"/>
                            </li>
                            <li>
                                <p>城市：</p>
                                <input type="text" name="city"/>
                            </li>
                            <li>
                                <p>区域：</p>
                                <input type="text" name="district"/>
                            </li>
                            <li>
                                <p>街道：</p>
                                <input type="text" name="street"/>
                            </li>
                            <li>
                                <p>联系方式：</p>
                                <input type="text" name="contract"/>
                            </li>
                            <li>
                                <p>头像：</p>
                                <input type="text" name="protrait"/>
                            </li>
                            <li>
                                <p>账户状态：</p>
                                <select name="ustatus">
                                    <option value="">所有</option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="user:dictKkuserInfo:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="user:dictKkuserInfo:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="user:dictKkuserInfo:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="user:dictKkuserInfo:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('user:dictKkuserInfo:edit')}]];
        var removeFlag = [[${@permission.hasPermi('user:dictKkuserInfo:remove')}]];
        var prefix = ctx + "user/dictKkuserInfo";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "用户信息",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'kkuid', 
                    title : 'null',
                    visible: false
                },
                {
                    field : 'registertime', 
                    title : '注册时间'
                },
                {
                    field : 'openid', 
                    title : 'openid'
                },
                {
                    field : 'nickname', 
                    title : '昵称'
                },
                {
                    field : 'phone', 
                    title : '手机号'
                },
                {
                    field : 'type', 
                    title : '账户类型1qq，2微信'
                },
                {
                    field : 'gender', 
                    title : '0未知， 性别1男，2女'
                },
                {
                    field : 'age', 
                    title : 'null'
                },
                {
                    field : 'major', 
                    title : '学级【小初高大】'
                },
                {
                    field : 'minor', 
                    title : '班【一年级二年级】'
                },
                {
                    field : 'province', 
                    title : '省份'
                },
                {
                    field : 'city', 
                    title : '城市'
                },
                {
                    field : 'district', 
                    title : '区域'
                },
                {
                    field : 'street', 
                    title : '街道'
                },
                {
                    field : 'contract', 
                    title : '联系方式'
                },
                {
                    field : 'protrait', 
                    title : '头像'
                },
                {
                    field : 'ustatus', 
                    title : '账户状态'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.kkuid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.kkuid + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>